package com.example.gw_back_end.controller;

import com.example.gw_back_end.domain.Result;
import com.example.gw_back_end.service.UpLoadService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("upload")
public class UpLoadController {

    private final UpLoadService upLoadService;
    public UpLoadController(UpLoadService upLoadService) {
        this.upLoadService = upLoadService;
    }

    @PostMapping
    public Result upload(MultipartFile file) {
        return Result.success(upLoadService.upload(file));
    }
}
